import request from '@/utils/request'

// 查询商品分销信息列表
export function listMarket(query) {
  return request({
    url: '/system/market/list',
    method: 'get',
    params: query
  })
}
export function listMarketTjAmount(query) {
  return request({
    url: '/system/market/listTjAmount',
    method: 'get',
    params: query
  })
}
export function listMarketTj(query) {
  return request({
    url: '/system/market/listTj',
    method: 'get',
    params: query
  })
}

// 查询商品分销信息详细
export function getMarket(id) {
  return request({
    url: '/system/market/' + id,
    method: 'get'
  })
}

// 新增商品分销信息
export function addMarket(data) {
  return request({
    url: '/system/market',
    method: 'post',
    data: data
  })
}

// 修改商品分销信息
export function updateMarket(data) {
  return request({
    url: '/system/market',
    method: 'put',
    data: data
  })
}

// 删除商品分销信息
export function delMarket(id) {
  return request({
    url: '/system/market/' + id,
    method: 'delete'
  })
}
